package su.oom.test;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;

public class Main {


    public  static List<Object> list = new ArrayList<>();

    public static void main(String[] args) throws InterruptedException {
//        List<Object> list = new ArrayList<>();
//        while (true) {
//            list.add(new byte[1024 * 1024]); // 创建1MB大小的对象
//        }

        System.out.println("hello world start..." + list.size());
        TimeUnit.DAYS.sleep(1);
        System.out.println("hello world end..." + list.size());
    }

    static {

        list.add(new byte[1024 * 1024]);
        list.add(new byte[1024 * 1024]);
        list.add(new byte[1024 * 1024]);
        list.add(new byte[1024 * 1024]);
    }
}
